package week7.example;
//*******************************************************************************************************
//  Book2.java   Author:Duanhzhixuan
//Represents a book. Used as the parent of a derived class to domonstrate inheritance and the use of the
// super reference.
//*******************************************************************************************************
public class Book2
{
protected int pages;
//-----------------------------------------------------------------------------------------------------------
//  Constructor: Sets up the book with the specified numberv of paged.
//------------------------------------------------------------------------------------------------------------------
    public Book2(int numPages)
    {
        pages=numPages;
    }

//*********************************************************************************************
//  Pages mutator.
//************************************************************************************************
public void setPages(int numPages)
{
    pages=numPages;
}
//---------------------------------------------------------------------------------------------------------
//   Pages accessor.
//---------------------------------------------------------------------------------------------------------
public int getPages()
{
    return pages;
}
}

